<template>
  <!--遮罩层-->
  <view class="cover-panel" v-if="display" @close="close" @click="tap"></view>
</template>

<script>
export default {
  props: {
    display: {},
    zIndex: {}
  },
  methods: {
    tap() {
      this.$emit('tap');
    },
    close() {
      this.$emit('close');
    }
  }
};
</script>

<style lang="less">
.cover-panel {
  width: 100%;
  height: 100%;
  position: fixed;
  top: 0;
  left: 0;
  background-color: black;
  -webkit-filter: opacity(0.6);
  z-index: 10000;
}
</style>
